'use strict';

import EntryModel from '../../models/v1/entry'

class Entry {
  constructor() {

  }
  async getEntry(cxt, next) {
    try {
      const entries = await EntryModel.find({}, '-_id');
      cxt.body = entries;
    } catch (err) {
      console.log('获取数据失败');
      cxt.body = {
        status: 0,
        type: 'ERROR_DATA',
        message: '获取数据失败'
      }
      return
    }
  }
}

export default new Entry()